<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf介绍</title>

    <link th:href="@{/css/style.css}" rel="stylesheet"/>
</head>
<body>

<span th:text="${hello}"></span>
<br/>
<!--#{weclome}读取message.properties中相应的属性-->
<h2 th:text="#{weclome}"></h2>
<br/>

<br/>
<br/>
<span>th:if条件表达式</span>
<br/>
<div th:if="${personBean.age}gt 5">
条件成立，执行该div
</div>

<br/>
<br/>
<br/>
<ol>
    <li>List循环：
        <table border="1">
            <tr>
                <th>用户名</th>
                <th>密碼</th>
                <th>地址</th>
                <th>年齡</th>

            </tr>
            <tr  th:each="person : ${personsList}">
                <td th:text="${person.name}"></td>
                <td th:text="${person.password}"></td>
                <td th:text="${person.address}"></td>
                <th th:text="${person.age}"></th>
            </tr>
        </table>
    </li>
</ol>
<br/>
<br/>
<br/>
<span>格式化輸出（內置方法）</span><br/>
字符串长度：<input type="text" th:value="${#strings.length(personBean.name)}"/>

<br/>
<br/>
<br/>
<span >th:href标签的使用</span>
<a th:href="@{/thymeleaf/testHref}">这是一个链接</a>
<br/>
<br/>
<br/>
引入片段信息
<div th:insert="foot :: bottom"></div>


</body>

<script type="text/javascript" th:src="@{/plugins/jquery/jquery-3.2.1.min.js}"></script>
</html>